Skip to content

refactor(activesync): centralize client quirks in Device::hasQuirk() - #89

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
refactor/centralize-client-quirks
Jul 22, 2026
Merged

refactor(activesync): centralize client quirks in Device::hasQuirk()#89
ralflang merged 1 commit into
FRAMEWORK_6_0from
refactor/centralize-client-quirks

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Centralize the last inline client-specific branch behind the existing
    Horde_ActiveSync_Device::hasQuirk() mechanism.
  • Document the policy for future client-specific deviations in the
    Device class docblock.

Motivation

Client workarounds should be discoverable and testable in one place.
Device::hasQuirk() with QUIRK_* constants already exists (picture
tag handling, TNEF support), but the Outlook 2013 MOVEITEMS workaround
in State_Base::getChanges() still compared the deviceType string
inline.

Changes

  • New QUIRK_REASSIGNS_UID_ON_MOVE constant + hasQuirk() case
    (Outlook 2013 reassigns the existing email the new UID on MOVEITEMS
    instead of duplicating it, so the ADD must not be sent).
  • State_Base::getChanges() uses the quirk instead of the hard-coded
    WindowsOutlook15 comparison; behavior is unchanged.
  • Class docblock documents where client-specific branches belong.

Test plan

  • New unit test testReassignsUidOnMoveQuirk (OL2013 true, iOS false)
  • Full package suite: no new failures

Replace the hard-coded WindowsOutlook15 deviceType comparison in
State_Base::getChanges() with a new QUIRK_REASSIGNS_UID_ON_MOVE
constant resolved through Horde_ActiveSync_Device::hasQuirk(), so all
client-conditional branches live in one place. Document the quirk
policy in the Device class docblock: hard client branches go through
hasQuirk(); universally safe workarounds stay client-agnostic.
@TDannhauer
TDannhauer requested a review from ralflang July 22, 2026 06:01
@github-actions

Copy link
Copy Markdown

🔍 CI Results

Overall: ❌ 12/12 lanes failed

TL;DR: ❌ Quality issues: PHPStan: 243 unique errors in 11 lanes; PHP-CS-Fixer: 25 files.

Summary by PHP Version

PHP dev stable
8.0
8.1
8.2
8.3
8.4
8.5

Quality Metrics

  • PHPUnit: did not run (11 lanes exited non-zero with no test output) ❌
  • PHPStan (advisory): 243 unique errors in 11 lanes ⚠️
  • PHP-CS-Fixer: 25 unique files with issues (of 204 checked) ⚠️
❌ Failed Lanes

php8.0-dev

  • PHPUnit: 0 failures, 0 errors

php8.0-stable

  • PHPUnit: ❌ Setup failed (Composer install failed in /tmp/horde-ci/lanes/php8.0-stable/ActiveSync: Your requirements could not be resolved to an installable set of packages.)
  • PHPStan: ❌ Setup failed (Composer install failed in /tmp/horde-ci/lanes/php8.0-stable/ActiveSync: Your requirements could not be resolved to an installable set of packages.)

php8.1-dev

  • PHPUnit: 0 failures, 0 errors

php8.1-stable

  • PHPUnit: 0 failures, 0 errors

php8.2-dev

  • PHPUnit: 0 failures, 0 errors

php8.2-stable

  • PHPUnit: 0 failures, 0 errors

php8.3-dev

  • PHPUnit: 0 failures, 0 errors

php8.3-stable

  • PHPUnit: 0 failures, 0 errors

php8.4-dev

  • PHPUnit: 0 failures, 0 errors
  • PHP-CS-Fixer: 25 files with issues

php8.4-stable

  • PHPUnit: 0 failures, 0 errors

php8.5-dev

  • PHPUnit: 0 failures, 0 errors

php8.5-stable

  • PHPUnit: 0 failures, 0 errors

CI powered by horde-componentsView full results

@ralflang
ralflang merged commit 153334b into FRAMEWORK_6_0 Jul 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants